Mac 初始化环境

很多时候,没有人愿意重装系统,除非万不得已。

Mac 部分进程负载较高(bird)

  • 关闭iCloud 文稿/桌面的备份
  • 从iCloud中复制出来文稿里面的文件,因为关闭同步后文稿会自动清空。其实感觉这个就像软链

iterm2

安装
http://img.mknight.cn/iTerm2-3_2_8.zip

brew

1
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

zsh

1
2
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
chsh -s /bin/zsh

bash/zsh切换

1
chsh -s /bin/zsh
1
wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | sh

pip

1
2
sudo easy_install pip
sudo pip install requests

pip源

1
2
3
4
5
6
豆瓣 https://pypi.douban.com/simple
阿里云 https://mirrors.aliyun.com/pypi/simple
清华大学 https://pypi.tuna.tsinghua.edu.cn/simple
中国科学技术大学 https://pypi.mirrors.ustc.edu.cn/simple
中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple
官方 https://pypi.python.org/simple/

pip 加速

1
2
3
[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
format = columns

插件目录

1
/Users/medivh/.oh-my-zsh/plugins

virtualenv

1
2
3
4
5
6
7
8
9
10
11
12
pip install virtualenv
# 不安装任何第三方包
virtualenv --no-site-packages venv

# 指定版本
virtualenv -p /usr/bin/python2.7 venv

#激活虚拟环境
source venv/bin/activate

#推出虚拟环境
deactivate

Markdown 图床

参考http://mknight.cn/markdown%20%E5%9B%BE%E5%BA%8A%E7%94%9F%E6%88%90.html

vs code

  • 安装vs code
  • 安装插件 markdownlint evermonkey
  • 配置插件-印象笔记
    • 命令行输入 ever tokent,然后分别粘贴evermonkey.token, evermonkey.noteStoreUrl
    • 新建笔记 option+n
    • 推送笔记 option+

hexo 环境

参考http://mknight.cn/Hexo-%E5%8D%9A%E5%AE%A2%E7%B3%BB%E7%BB%9F%E6%90%AD%E5%BB%BA.html

Mac kvm

https://github.com/jeffreywildman/homebrew-virt-manager.git

1
2
3
4
5
6
brew tap jeffreywildman/homebrew-virt-manager
brew install virt-manager virt-viewer

#使用
virt-manager -c 'qemu+ssh://user@libvirthost/system?socket=/var/run/libvirt/libvirt-sock'
virt-viewer -c 'qemu+ssh://user@libvirthost/system?socket=/var/run/libvirt/libvirt-sock'

其他问题

------ 本文结束 ------

版权声明

Medivh's Notes by Medivh is licensed under a Creative Commons BY-NC-ND 4.0 International License.
Medivh创作并维护的Medivh's Notes博客采用创作共用保留署名-非商业-禁止演绎4.0国际许可证
本文首发于Medivh 博客( http://www.mknight.cn ),版权所有,侵权必究。